import request from '@/utils/request'
// 用户注册
export const userRegisterService = ({ username, password, repassword }) =>
  request.post('/api/reg', { username, password, repassword })
//获取用户信息
export const userGetInfoService = () => request.get('/my/userinfo')
// 更新用户信息
export const userUpdateInfoService = ({ userId, username, nickname, email }) =>
  request.put('/my/userinfo', { userId, username, nickname, email })
// 更新用户头像
export const userUploadAvatarService = (data) => request.post('/my/update/avatar', data)
// 更新用户密码
export const userUpdatePassService = ({ oldPwd, newPwd, rePwd }) =>
  request.post('/my/updatepwd', { oldPwd, newPwd, rePwd })
